import json
from collections import Counter

with open("word-count_dict_0-9999.txt",'r') as f:
	up_to_9999 = Counter(json.loads(f.readline()))

with open("word-count_dict_10000-65180.txt",'r') as f:
	up_to_end = Counter(json.loads(f.readline()))

total = Counter()
total = up_to_9999 + up_to_end

with open("word-count_dict_0-65180.txt",'w') as f:
	f.write(json.dumps(total))

with open("common-words_list_0-65180.txt",'w') as cwf:
	cwf.write(json.dumps(total.most_common(5000)))

